package com.letv.business.flow.PlayFlowModule;

import android.app.Application;

import com.ledim.app.LeDimApplication;
import com.letv.business.flow.LeMPSession.PlayStateableHandler;
import com.letv.business.flow.PlayFlowState.PlayAuthState;
import com.letv.business.flow.PlayFlowState.PlayErrorState;
import com.letv.business.flow.PlayFlowState.PlayFetchMetaState;
import com.letv.business.flow.PlayFlowState.PlayIdleState;
import com.letv.business.flow.PlayFlowState.PlayStartPlayState;
import com.letv.business.flow.PlayFlowState.PlayUrlPrepareState;

import dagger.Component;
import javax.inject.Singleton;



/**
 * Created by jipengfei on 2016/11/9.
 */
@Singleton
@Component(modules = {MainModule.class})
public interface ApplicationComponent {

    void inject(PlayIdleState playIdleState);

    void inject(PlayStateableHandler playStateableHandler);

    void inject(PlayFetchMetaState playFetchMetaState);

    void inject(PlayAuthState playAuthState);

    void inject(PlayUrlPrepareState playUrlPrepareState);

    void inject(PlayStartPlayState playStartPlayState);

    void inject(PlayErrorState playErrorState);

    final class Initializer {

        private Initializer() {
        }

        public static ApplicationComponent init(Application app) {
            DaggerApplicationComponent.Builder builder = DaggerApplicationComponent.builder();

            return builder
                    .mainModule(new MainModule(app))
                    .build();

        }
    }
}